-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test against all supported versions of mocha #157
Conversation
There are reports (michaelleeallen#148) of mocha-junit-reporter not working against certain versions of mocha. We really need to test more than one version of mocha to ensure that doesn't happen.
@@ -28,7 +28,15 @@ | |||
"chai": "^3.0.0", | |||
"chai-xml": "^0.3.0", | |||
"eslint": "^7.0.0", | |||
"mocha": "^7.2.0", | |||
"mocha": "^9.1.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the version of mocha used when CI runs node_modules/.bin/mocha
.
@@ -151,7 +153,7 @@ describe('mocha-junit-reporter', function() { | |||
|
|||
// We don't want Mocha to emit timeout errors. | |||
// If we want to simulate errors, we'll emit them ourselves. | |||
rootSuite.enableTimeouts(false); | |||
rootSuite.timeout(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Otherwise, this runner would intercept uncaught exceptions that were already handled by the mocha instance | ||
// running our tests. | ||
runner.dispose(); | ||
if (runner.dispose) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.dispose()
isn't available in older versions of mocha.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Halle-freakin'-lujah! 🎉 I had no idea how to accomplish this, but it's been on my list for a very long time!
Introduced by michaelleeallen#157. No idea how that build passed.
It looks like this is causing the build to fail (https://github.com/michaelleeallen/mocha-junit-reporter/runs/3895617023) due to a Anyway here's a tentative fix: #159 |
Introduced by michaelleeallen#157. No idea how that build passed.
Introduced by michaelleeallen#157. No idea how that build passed.
Introduced by michaelleeallen#157. No idea how that build passed.
There are reports (#148) of mocha-junit-reporter not working against certain versions of mocha. We really need to test more than one version of mocha to ensure that doesn't happen.